126

Bioinformatics of the Brain

Otsu’s Thresholding Method

Otsu thresholding is an unsupervised and non-parametric method employed

for automatically selecting thresholds in grayscale image segmentation. It is

named after its creator, Nobuyuki Otsu, who devised this method [39]. It is

one of the most commonly employed global thresholding methods. It allows

for determining the most appropriate threshold value to be used in reducing a

gray-level image into two groups. The assumption made is that the input image

comprises of two distinct classes, namely the background and the foreground.

Subsequently, it proceeds to ascertain a threshold value (t). The weight (w),

mean (µ) and variance (σ2) values of these two groups are determined for all

threshold values.

Weight values for background (wb(t)) and foreground (wf(t)) are calcu-

lated as in Equation 4.11 [40]. In the equation, i shows the brightness value

of the pixel, t represents the threshold value, I stands for the maximum pixel

brightness value in the image and P(i) indicates number of pixels with bright-

ness value i.

wb(t) =

t

i=0 P(i)

I

i=0 P(i)

and

wf(t) =

I

i=t+1 P(i)

I

i=0 P(i)

(4.11)

In Equation 4.12, qb(t) and qf(t) indicate the total number of pixels in the

background and foreground according to the threshold value t, respectively

[40].

qb(t) =

t



i=0

P(i)

and

qf(t) =

I



i=t+1

P(i)

(4.12)

Background and foreground mean values are calculated as in Equation

4.13 [40]:

µb(t) =

t



i=0

iP(i)

qb(t)

and

µf(t) =

I



i=t+1

iP(i)

qb(t)

(4.13)

The individual class variances are given in Equation 4.14 [40]:

σ2

b(t) =

t



i=0

[iµb(t)]2 P(i)

qb(t) and σ2

f(t) =

I



i=t+1

[iµf(t)]2 P(i)

qf(t)

(4.14)

The within-class variance is calculated as in Equation 4.15 [40]:

σ2

w(t) = wb(t)σ2

b(t) + wf(t)σ2

f(t)

(4.15)

The between class variance is computed using Equation 4.16 [40]:

σ2

B(t) = wb(t)wf(t)(µb(t)µf(t))2

(4.16)